package helper;

import java.math.BigInteger;

public class Helper
{
	private Helper() {}
	
	public static boolean isEqual(BigInteger b1, BigInteger b2)
	{
		if (b1 == null && b2 == null)
		{
			return true;
		}
		else if (b1 != null && b2 != null)
		{
			return b1.equals(b2);
		}
		return false;
	}
	
	public static boolean isSuperior(BigInteger b1, BigInteger b2)
	{
		if (b1 != null && b2 != null)
		{
			int result = b1.compareTo(b2);
			return result > 0;
		}
		return false;
	}
	
	public static boolean isSuperiorOrEqual(BigInteger b1, BigInteger b2)
	{
		return isEqual(b1, b2) || isSuperior(b1, b2);
	}
	
	public static boolean isInferior(BigInteger b1, BigInteger b2)
	{
		if (b1 != null)
		{
			int result = b1.compareTo(b2);
			return result < 0;
		}
		return false;
	}
	
	public static boolean isInferiorOrEqual(BigInteger b1, BigInteger b2)
	{
		return isEqual(b1, b2) || isInferior(b1, b2);
	}
}
